Skip to content

MCP: add compact pattern guidance#8227

Draft
adierkens wants to merge 2 commits into
adierkens-component-composition-metadatafrom
adierkens-optimize-mcp-patterns
Draft

MCP: add compact pattern guidance#8227
adierkens wants to merge 2 commits into
adierkens-component-composition-metadatafrom
adierkens-optimize-mcp-patterns

Conversation

@adierkens

Copy link
Copy Markdown
Contributor

Closes #

Changelog

New

  • get_pattern returns compact structured guidance with explicit public and internal component references.

Changed

  • detail: "full" uses the pattern text-only endpoint when available and falls back to the existing HTML conversion during rollout.

Removed

  • None.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

PR 1 of a reviewable stack targeting adierkens-component-composition-metadata.

  • npx --yes -p node@26.4.0 node node_modules/vitest/vitest.mjs --run packages/mcp/src/patterns.test.ts packages/mcp/src/server.test.ts
  • npm run type-check -w @primer/mcp
  • npm run build -w @primer/mcp
  • npm run lint
  • npm run format:diff

Review the get_pattern default structured contract and detail: "full" text-only endpoint fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4c3c4aa9-78c5-4b57-81c0-5f97416b4977
@changeset-bot

changeset-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2a7a9a4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/mcp Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jul 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4c3c4aa9-78c5-4b57-81c0-5f97416b4977
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant